package com.meida.module.bus.client.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.meida.common.mybatis.base.entity.AbstractEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.meida.common.mybatis.annotation.TableAlias;

import java.math.BigDecimal;
import java.util.List;

/**
 * PMS物料计划关联SRM表
 *
 * @author flyme
 * @date 2020-10-31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_material_srm_sub")
@TableAlias("bmss")
@ApiModel(value="BusMaterialSrmSub对象", description="PMS物料计划关联SRM表")
@ToString
public class BusMaterialSrmSub extends AbstractEntity {

private static final long serialVersionUID=1L;

    @TableId(value = "busMaterialSrmSubId", type = IdType.AUTO)
    private Long busMaterialSrmSubId;

    @ApiModelProperty(value = "关联主表主key")
    private Long busMaterialSrmId;

    @ApiModelProperty(value = "材料计划关联主键")
    private Long materialPlanId;

    @ApiModelProperty(value = "计划当前版本")
    private int ver;

    @ApiModelProperty(value = "分包计划关联主键")
    private Long materialPackageId;

    @ApiModelProperty(value = "供应商Id")
    private Long supplierId;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty("PMS材料申请计划ID")
    private Long purchaseId;

    @ApiModelProperty("PMS材料申请计划明细ID")
    private Long purchaseDetailsId;

    @ApiModelProperty(value = "合同ID")
    private Long contractsId;

    @ApiModelProperty(value = "合同编码")
    private String contractNo;

    @ApiModelProperty(value = "是否有开口订单 0否 1是")
    private String orderFlg;

    @ApiModelProperty(value = "合同明细ID")
    private Long contractsmatdtlId;

    @ApiModelProperty(value = "合同行号")
    private Integer contractRowno;

    @ApiModelProperty(value = "采购订单ID")
    private Long purchaseorderId;

    @ApiModelProperty(value = "采购订单编码")
    private String purchaseorderNo;

    @ApiModelProperty(value = "采购订单明细")
    private Long purchaseorderDetailid;

    @ApiModelProperty(value = "采购订单行号")
    private Integer purchaseorderRowno;

    @ApiModelProperty("送货单ID")
    private Long deliveryId;

    @ApiModelProperty("行号")
    private int rowids;

    @ApiModelProperty("送货单细单ID")
    private Long shoppingNoticeDetailId;

    @ApiModelProperty("送货明细行号")
    private Integer shoppingNoticeRowId;

    @ApiModelProperty(value = "wbs")
    private String wbs;

    @ApiModelProperty(value = "物料代码")
    private String materialCode;

    @ApiModelProperty(value = "材料名称")
    private String materialName;

    @ApiModelProperty(value = "订单数量")
    private BigDecimal orderQty;

    @ApiModelProperty(value = "已下数量")
    private BigDecimal orderOutQty;

    @ApiModelProperty(value = "剩余数量")
    private BigDecimal orderSurplusQty;

    @ApiModelProperty(value = "本次下单数量")
    private BigDecimal orderThisTimeQty;

    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty(value = "项目编码")
    private String projectCode;

    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "专业代码")
    private String majorCode;

    @ApiModelProperty(value = "专业名称")
    private String majorName;

    @ApiModelProperty(value = "工程包代码")
    private String packageCode;

    @ApiModelProperty(value = "工程包名称")
    private String packageName;

    @ApiModelProperty("PMS系统下达的合同量")
    private BigDecimal pmsCount;

    @ApiModelProperty("SRM系统录入的实际分包价格")
    private BigDecimal pmsPrice;

    @ApiModelProperty("送货单关联表")
    @TableField(exist = false)
    private List<BusDeliverSrm> busDeliverSrms;

    @ApiModelProperty("开口同步标识")
    private String sycnFlgForOpen;
}
